
<style type="text/css">
    body {
        background: #fff;
    }
    .page-header {
        height: 90px;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #e5e5e5;
    }
    .page-header:before {
        display: none;
    }
    .page-header .inner {
        height: 90px;
        width: 1080px;
        margin: auto;
    }
    .page-header .inner .logo {
        height: 90px;
        width: auto;
        vertical-align: middle;
    }
    .page-header .inner .logo img {
        max-height: 90px;
        width: auto;
        vertical-align: middle;
    }

    .page-content {
        display: block;
        float: none;
        width: 1080px;
        margin: auto;
        padding: 72px 0;
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        border-bottom: 1px solid #e5e5e5;
    }

    .signup-adv {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
        padding-right: 40px;
    }
    .signup-adv img {
        max-height: 100%;
        max-width: 100%;
    }
    .signup-main{
        width: 360px;
        height: 390px;
        padding: 40px;
        border: 1px solid #e5e5e5;
    }
    .signup-main .title {
        color: #333;
        font-size: 16px;
    }
    .signup-main .title span {
        font-size: 12px;
        color: #666;
        padding-left: 4px;
    }
    .signup-main .input {
        height: 38px;
        width: 100%;
        margin-top: 20px;
    }
    .signup-main .input input {
        height: 38px;
        width: 100%;
        border: 1px solid #e5e5e5;
        outline: none;
        border-radius: 3px;
        padding: 0 10px;
        font-size: 14px;
    }
    .signup-main .input input:focus {
        border: 1px solid #44abf7;
    }
    .signup-main .button {
        height: 38px;
        width: 100%;
        margin-top: 14px;
    }
    .signup-main .button input {
        height: 38px;
        width: 100%;
        background: #44abf7;
        border: 0;
        border-radius: 3px;
        color: #fff;
        font-size: 16px;
        outline: none;
    }
    .signup-main .button input:active {
        background: #33a4f7;
    }
    .signup-main .option {
        height: 40px;
        line-height: 40px;
        text-align: right;
        margin-bottom: 5px;
    }
    .signup-main .option span {
        cursor: pointer;
    }
    .signup-main .option span:hover {
        border-bottom: 1px solid #666;
    }
    .signup-main .text {
        border-top: 1px solid #e5e5e5;
        width: 100%;
        padding: 10px 0;
    }
    .signup-main .text p.title {
        font-size: 14px;
        color: #444;
    }
    .signup-main .text p {
        font-size: 12px;
        margin-bottom: 8px;
        color: #999;
    }
</style>
<body>

<div class="page-header">
    <div class="inner">
        <div ng-if="pagedata.set.reglogo!=''" class="logo">
           
                <img src="{{pagedata.set.reglogo}}"/>
           
        </div>
    </div>
</div>

<div class="page-content">
    <div class="signup-adv">
        <img src="../addons/jy_merch/images/regbg.png" />
    </div>
    <div class="signup-main">
        <div class="title">商家登录 <span>登录到商家管理后台</span></div>
        <div class="input"><input type="text" name="username" ng-model="pagedata.info.username" placeholder="请输入登录账号" /></div>
        <div class="input"><input type="password" name="pwd" ng-model="pagedata.info.pwd" placeholder="请输入登录密码" /></div>
        <div class="button"><input type="submit" ng-click="post(pagedata.info,'post')" value="登录" id="btn-login" /></div>
        <div class="option"><span class="foget">忘记密码</span> </div>
        <div class="text">
            <p class="title">温馨提示</p>
            <p>请使用管理员分配的账号密码进行登录，管理自己的店铺哦~有问题请联系系统管理员。</p>
        </div>
    </div>
</div>


<script language='javascript'>
    $(".foget").click(function () {
        tip.alert("忘记密码请联系系统管理员");
    });
    $(".signup-main .input input").keydown(function (e) {
        if(e.keyCode==13){
            var name = $(this).attr('name');
            var value = $.trim($(this).val());
            if(name=='username' && value!=''){
                $("input[name='pwd']").focus();
            }
            if(name=='pwd' && value!=''){
                $('#btn-login').click();
            }
        }
    });
    $('#btn-login').click(function () {
        if ($(":input[name=username]").isEmpty()) {
            tip.msgbox.err('请输入登录账号');
            $(":input[name=username]").focus();
            return;
        }
        if ($(":input[name=pwd]").isEmpty()) {
            tip.msgbox.err('请输入登录密码');
            $(":input[name=pwd]").focus();
            return;
        }
        if ($(this).attr('stop')) {
            return;
        }
        $('#btn-login').attr('stop', 1).val('正在登录...');
        $.ajax({
            url: "{$submitUrl}",
            type: 'post',
            data: {username: $(":input[name=username]").val(), pwd: $(":input[name=pwd]").val()},
            dataType: 'json',
            cache: false,
            success: function (ret) {
                if (ret.status == 1) {
                    tip.msgbox.suc("登录成功");
                    $('#btn-login').attr('stop', 1).val('跳转中...');
                    setTimeout(function () {
                        location.href = ret.result.url;
                    }, 500);
                    return;
                }
                $('#btn-login').removeAttr('stop').val('登录');
                $(":input[name=pwd]").select();
                tip.msgbox.err(ret.result.message);
            }
        })
    })
</script>

</body>
</html>
